﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MastePage/SubEmptyMaster.Master" AutoEventWireup="true" CodeBehind="CustomerEdit.aspx.cs" Inherits="BySoft.Web.Site.MasteData.CustomerEdit" %>

<%@ MasterType VirtualPath="~/MastePage/SubEmptyMaster.Master" %>
<%@ Register Assembly="OneSoft.Web" Namespace="OneSoft.Web.UI.WebControls" TagPrefix="asp" %>
<%@ Register Src="../UserControl/SuggestTextBox2.ascx" TagName="SuggestTextBox2"
    TagPrefix="uc1" %>
<%@ Register Assembly="BySoft.Web.Controls" Namespace="BySoft.Web.Controls" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadPlace" runat="server">
    <script type="text/javascript">
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="EmptyMasteCPH" runat="server">
    <h1 class="tit">基础资料 >> <a href="CustomerList.aspx">客户资料</a> >> 编辑</h1>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div class="tableStyle2">
                <table cellpadding="0" cellspacing="0" border="1">
                    <tr>
                        <th class="left2">客户编号：</th>
                        <td class="right2"><asp:Label ID="lblCustomerID" runat="server" Text="" Width="120" class="lblreadonly"></asp:Label></td>
                        <th class="left2">客户名称：</th>
                        <td class="right2">
                            <asp:TextBox CssClass="" ID="txtCustomerName" runat="server" Width="300"></asp:TextBox>
                            <span style="color: Red">*</span>
                            <asp:RequiredFieldValidator ControlToValidate="txtCustomerName" Display="None" ErrorMessage="请输入客户名称！" ID="RequiredFieldValidator1" ValidationGroup="gSubmit" runat="server"  ></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <th class="left2">公司地址：</th>
                        <td class="right2">
                            <asp:TextBox CssClass="" ID="txtAddr" runat="server" Width="300"></asp:TextBox>    
                            <span style="color: Red">*</span>
                            <asp:RequiredFieldValidator ControlToValidate="txtAddr" Display="None" ErrorMessage="请输入公司地址！" ID="RequiredFieldValidator2" ValidationGroup="gSubmit" runat="server"  ></asp:RequiredFieldValidator>
                       </td>
                        <th class="left2">客户来源：</th>
                        <td class="right2">
                            <asp:DropDownList ID="ddlCustomerFrom" runat="server" CssClass="ddlwidth"></asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <th class="left2">客户等级：</th>
                        <td class="right2">
                            <asp:DropDownList ID="ddlCustomerScaler" runat="server" CssClass="ddlwidth"></asp:DropDownList>
                        </td>
                        <th class="left2">负责人：</th>
                        <td class="right2">
                            <asp:TextBox ID="txtMasterPerson" runat="server" MaxLength="10"></asp:TextBox>
                        </td>
                    </tr>
                </table>
            </div>
            <div class="tableStyle">
	            <div class="ui-tabs ui-widget ui-widget-content ui-corner-all" id="tabs">
                    <ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
                        <li class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active"><a href="#tabs-1">明细</a></li>
                    </ul>
		            <div id="tabs-1" class="tableStyle ui-tabs-panel ui-widget-content ui-corner-bottom">
                        <asp:UpdatePanel ID="UpdatePanel4" runat="server">
                            <ContentTemplate>
                                <div style="width: 100%; padding-bottom: 10px">
                                    <div align="right">
                                        <label class="btnStylec png_bg">
                                                <asp:Button ID="btnAdd" runat="server" Text="新增" OnClick="btnAdd_Click" />
                                            </label>
                                            <label class="btnStylec png_bg">
                                                <asp:Button ID="btnAddh" runat="server" class="Hidden" Text="Button" />
                                            </label>
                                    </div>
                                </div>
                                <div>
                                    <asp:SGridView runat="server" ID="grdDetail" AutoGenerateColumns="false" Width="100%" OnRowCommand="grdDetail_RowCommand" OnRowDataBound="grdDetail_RowDataBound">
                                        <Columns>
                                            <asp:TemplateField HeaderStyle-CssClass="Hidden" ItemStyle-CssClass="Hidden">
                                                <HeaderTemplate>客户编号</HeaderTemplate>
                                                <ItemTemplate>
                                                    <asp:Label ID="lblsCustomerID" runat="server" Text='<%#  Eval("CustomerDetailID") %>'></asp:Label>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField>
                                                <HeaderTemplate>联系人姓名</HeaderTemplate>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txtContactName" runat="server" Width="120" Text='<%#  Eval("ContactName") %>'></asp:TextBox>
                                                    <span style="color: Red">*</span>
                                                    <asp:RequiredFieldValidator ControlToValidate="txtContactName" Display="None" ErrorMessage="请输入联系人姓名！" ID="rfvContactName" ValidationGroup="gSubmit" runat="server"  ></asp:RequiredFieldValidator>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField>
                                                <HeaderTemplate>联系电话</HeaderTemplate>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txtTel" runat="server" Text='<%#  Eval("Tel") %>'></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField>
                                                <HeaderTemplate>职位</HeaderTemplate>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txtJob" runat="server" Width="120" Text='<%#  Eval("Job") %>'></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField>
                                                <HeaderTemplate>手机号码</HeaderTemplate>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txtMobile" runat="server" Text='<%#  Eval("Mobile") %>'></asp:TextBox>
                                                    <span style="color: Red">*</span>
                                                    <asp:RequiredFieldValidator ControlToValidate="txtMobile" Display="None" ErrorMessage="请输入手机号码！" ID="rfvMobile" ValidationGroup="gSubmit" runat="server"  ></asp:RequiredFieldValidator>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField>
                                                <HeaderTemplate>Email</HeaderTemplate>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txtEmail" runat="server" Text='<%#  Eval("Email") %>'></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField>
                                                <HeaderTemplate>QQ</HeaderTemplate>
                                                <ItemTemplate>
                                                    <asp:TextBox ID="txtQQ" runat="server" Text='<%#  Eval("QQ") %>'></asp:TextBox>
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField>
                                                <HeaderStyle Width="35px" />
                                                <HeaderTemplate>
                                                    删除
                                                </HeaderTemplate>
                                                <ItemTemplate>
                                                    <asp:ImageButton ImageUrl="../App_Themes/Common_CSS/images/delete_small.gif" runat="server"
                                                        ID="ibtnDel" />
                                                    <asp:Button ID="btnDel" runat="server" CssClass="Hidden" CommandName="del" CommandArgument="<%# Container.DisplayIndex %>" />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                    </asp:SGridView>
                                </div>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </div>
	            </div>
	        </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <div class="controlBar" align="center">
        <table cellpadding="0" cellspacing="0" style="width: 140px; margin: 0 auto;">
            <tr>
                <td>
                    <label class="btnStylec png_bg">
                        <asp:Button ID="btnSubmit" runat="server" Text="确定" ValidationGroup="gSubmit"
                            class="png_bg" OnClick="btnSubmit_Click" />
                    </label>
                    <label class="btnStyleb png_bg">
                        <input type="button" id="btnBack" value="返回" onclick="window.location = 'CustomerList.aspx'"
                            class="png_bg" /></label>
                </td>
            </tr>
        </table>
    </div>
</asp:Content>